package com.winsdom.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 计费明细表
 * </p>
 *
 * @author 
 * @since 2025-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("billing_detail")
public class BillingDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 明细ID
     */
    @TableId(value = "detail_id", type = IdType.AUTO)
    private Long detailId;

    /**
     * 计费主表ID
     */
    private Long billingMainId;

    /**
     * 三表名称
     */
    private String meterName;

    /**
     * 三表编号
     */
    private String meterNo;

    /**
     * 三表类型
     */
    private String meterType;

    /**
     * 表倍率
     */
    private BigDecimal meterRatio;

    /**
     * 上期用量
     */
    private BigDecimal lastUsage;

    /**
     * 上期抄报时间
     */
    private LocalDateTime lastRecordTime;

    /**
     * 三表上期读数
     */
    private BigDecimal lastReading;

    /**
     * 三表本期读数
     */
    private BigDecimal currentReading;

    /**
     * 用量
     */
    private BigDecimal usageAmount;

    /**
     * 单价(元)
     */
    private BigDecimal unitPrice;

    /**
     * 计费期间起
     */
    private LocalDate startDate;

    /**
     * 计费期间止
     */
    private LocalDate endDate;

    /**
     * 退费抵扣
     */
    private BigDecimal refundDeduction;

    /**
     * 预存冲抵
     */
    private BigDecimal prepaidOffset;

    /**
     * 销核金额
     */
    private BigDecimal writeOffAmount;


}
